﻿Ext.define('app.prm.project.ProjectProgress', {
    extend: 'Ext.grid.Panel',
    border: false,
    viewConfig: {
        enableTextSelection: true //可以复制单元格文字
    },
    controller: 'project',
    requires: ['app.prm.project.ProjectController', 'app.prm.project.ViewModel'],
    viewModel: {
        type: 'projectModel'
    },
    initComponent: function () {
        var me = this;
        me.store = Ext.create("app.ux.PrmStore", { url: '/api/services/app/project/GetProjectProgress' });
        me.tbar = [
            { text: localize('Add'), iconCls: "add", bind: { hidden: '{hasAdd}' }, handler: 'onAdd' },
        ];
        me.callParent();
    },
    forceFit: false,
    columns: [
        { header: '产品号', dataIndex: 'productNo' },
        { header: '项目号', dataIndex: 'projectNo' },
        { header: '项目名称', dataIndex: 'projectName' },
        { header: '状态', dataIndex: 'status' },
        { header: '属地', dataIndex: 'rdCenter' },
        { header: '项目经理', dataIndex: 'pm' },
        //{ header: '进度', dataIndex: 'schedule' },
        { header: '延期', dataIndex: 'delayPeriod' },
        { header: '计划开始时间', dataIndex: 'planStartTime' },
        { header: '计划结束时间', dataIndex: 'planEndTime' },
        { header: '实际开始时间', dataIndex: 'actualStartTime' },
        { header: '预期结束时间', dataIndex: 'actualEndTime' }
    ],
    listeners: {
        rowdblclick: 'onDbClick',
        afterrender: 'onInit'
    }
})